//
//  XFAudioHelper.h
//  test
//
//  Created by mac on 2017/9/6.
//  Copyright © 2017年 mac. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "iflyMSC/IFlySpeechRecognizerDelegate.h"
#import <UIKit/UIKit.h>

@class IFlySpeechRecognizer;

//定义协议
@protocol XFResults
-(void) onResult:(BOOL) success results:(NSString *)results;
@end


@interface XFAudioHelper : NSObject<IFlySpeechRecognizerDelegate,UIActionSheetDelegate>{
   id<XFResults>delegate;
}
@property (nonatomic, retain) id<XFResults>delegate;

//语法识别对象
@property (nonatomic, strong) IFlySpeechRecognizer * iFlySpeechRecognizer;
@property (nonatomic, strong) NSMutableString      * curResult;//当前session的结果
@property (nonatomic)         BOOL               isCanceled;
@property (nonatomic, weak)   IBOutlet UITextView  * resultView;


-(void) build;
-(void) start_record;
-(void) stop_record;
-(void) dealloc_audio;

@end
